#include "CppNpObject.h"

//----------------------------------------------------------------------------

void CppNpObject::Invalidate()
{
}

//----------------------------------------------------------------------------

bool CppNpObject::HasMethod(NPIdentifier name)
{
  return false;
}

//----------------------------------------------------------------------------

bool CppNpObject::Invoke(NPIdentifier name, const NPVariant *args,
                                   uint32_t argCount, NPVariant *result)
{
  return false;
}

//----------------------------------------------------------------------------

bool CppNpObject::InvokeDefault(const NPVariant *args,
                                          uint32_t argCount, NPVariant *result)
{
  return false;
}

//----------------------------------------------------------------------------

bool CppNpObject::HasProperty(NPIdentifier name)
{
  return false;
}

//----------------------------------------------------------------------------

bool CppNpObject::GetProperty(NPIdentifier name, NPVariant *result)
{
  return false;
}

//----------------------------------------------------------------------------

bool CppNpObject::SetProperty(NPIdentifier name, const NPVariant *value)
{
  return false;
}

//----------------------------------------------------------------------------

bool CppNpObject::RemoveProperty(NPIdentifier name)
{
  return false;
}

//----------------------------------------------------------------------------
//----------------------------------------------------------------------------

// static
void CppNpObject::_Deallocate(NPObject *npobj)
{
  // Call the virtual destructor.
  delete (CppNpObject *)npobj;
}

//----------------------------------------------------------------------------
// static
void CppNpObject::_Invalidate(NPObject *npobj)
{
  ((CppNpObject *)npobj)->Invalidate();
}

//----------------------------------------------------------------------------
// static
bool CppNpObject::_HasMethod(NPObject *npobj, NPIdentifier name)
{
  return ((CppNpObject *)npobj)->HasMethod(name);
}

//----------------------------------------------------------------------------
// static
bool CppNpObject::_Invoke(NPObject *npobj, NPIdentifier name,
                                    const NPVariant *args, uint32_t argCount,
                                    NPVariant *result)
{
  return ((CppNpObject *)npobj)->Invoke(name, args, argCount,
                                                       result);
}

//----------------------------------------------------------------------------
// static
bool CppNpObject::_InvokeDefault(NPObject *npobj,
                                           const NPVariant *args,
                                           uint32_t argCount,
                                           NPVariant *result)
{
  return ((CppNpObject *)npobj)->InvokeDefault(args, argCount,
                                                              result);
}

//----------------------------------------------------------------------------
// static
bool CppNpObject::_HasProperty(NPObject * npobj, NPIdentifier name)
{
  return ((CppNpObject *)npobj)->HasProperty(name);
}

//----------------------------------------------------------------------------
// static
bool CppNpObject::_GetProperty(NPObject *npobj, NPIdentifier name,
                                         NPVariant *result)
{
  return ((CppNpObject *)npobj)->GetProperty(name, result);
}

//----------------------------------------------------------------------------
// static
bool CppNpObject::_SetProperty(NPObject *npobj, NPIdentifier name,
                                         const NPVariant *value)
{
  return ((CppNpObject *)npobj)->SetProperty(name, value);
}

//----------------------------------------------------------------------------
// static
bool CppNpObject::_RemoveProperty(NPObject *npobj, NPIdentifier name)
{
  return ((CppNpObject *)npobj)->RemoveProperty(name);
}

